package com.ylsdxy.menu.controller;

import com.ylsdxy.menu.entity.FirstMenu;
import com.ylsdxy.menu.service.MenuService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ylsdxy.model.response.ResponseResult;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/menu")
public class MenuController {
    @Resource
    MenuService menuService;
    @RequestMapping("findAll")
    public ResponseResult<List<FirstMenu>> getMenuInfo(){
        List<FirstMenu> menuInfo = menuService.getMenuInfo();

        return new ResponseResult<>(ResponseResult.SUCCESS,"success",menuInfo);
    }
}
